<%@ page import="org.bjou.Course" %>
<%@ page import="org.bjou.UserGroup" %>
<!doctype html>
<html>
	<head>
		 <meta name="layout" content="pertho">
		<g:set var="entityName" value="${message(code: 'course.label', default: 'Course')}" />
		<title><g:message code="default.edit.label" args="[entityName]" /></title>
	</head>
	<body>
          <body>
          <div class="container">
    <div class="row">
      <div class="twelve columns">
        <div class="box_c">
          <div class="box_c_heading cf">
            <p>录入责任教师</p>
          </div>
          <div class="box_c_content">
             <!-- start -->
          <div id="edit-course" class="content scaffold-edit" role="main">
			<g:if test="${flash.message}">
			<div class="message" role="status">${flash.message}</div>
			</g:if>
			<g:hasErrors bean="${courseInstance}">
			<ul class="errors" role="alert">
				<g:eachError bean="${courseInstance}" var="error">
				<li <g:if test="${error in org.springframework.validation.FieldError}">data-field-id="${error.field}"</g:if>><g:message error="${error}"/></li>
				</g:eachError>
			</ul>
			</g:hasErrors>
			<g:form method="post" >
				
                                  <fieldset class="form">
                                  <div class="fieldcontain">
                                    <span id="courseName-label" class="property-label">
                                      课程名称
                                  </span>
                                     <span class="property-value" aria-labelledby="courseName-label">
                                      ${assignInstance?.courseName}
                                    </span>
                                   </div>
                                   <div class="fieldcontain">
                                    <span id="courseName-label" class="property-label"> 选择教师组</span>
                                     <span class="property-value" aria-labelledby="courseName-label">
                                        <g:select optionKey="id" value="${userBaseinfoInstance?.userGroup?.id}" noSelection="['':'-请选择-']" optionValue="groupName" from="${UserGroup.list()}" name="UserGroup.groupName"  onchange="${remoteFunction(controller:'UserGroup', action:'listByGroup', params:'\'id=\'+this.value', update:'userlist')}"></g:select>
                                      </span>
                                  </div>
                                      <div class="fieldcontain">
                                   <span id="courseName-label" class="property-label"> 选择教师 </span>
                                      <span class="property-value" aria-labelledby="courseName-label">
                                        <g:if test="${userBaseinfoInstance}">
                                          <div  id="userlist"><select name="userBaseinfo.id"><option value="${userBaseinfoInstance?.id}">${userBaseinfoInstance?.fullname}</option></select></div>
                                        </g:if>
                                        <g:if test="${!userBaseinfoInstance}">
                                         <div  id="userlist"><select><option>请选择教师</option></select></div>
                                         </g:if>
                                        </span>
                                  </div>
                                     <div class="fieldcontain">
                                   <span id="courseName-label" class="property-label"> 分配描述 </span>
                                    
                                   <span class="property-value" aria-labelledby="courseName-label">
                                     <g:textArea name="assignDscp"  rows="2" cols="10"/>
                                   </span>
                                  </div>
                                   
                                   
                                  
                                  
                                   <g:hiddenField name="courseName" value="${assignInstance?.courseName}" />
                                   <g:hiddenField name="majorLevel" value="${assignInstance?.majorLevel}" />
                                   <g:hiddenField name="courseProperty" value="${assignInstance?.courseProperty}" />
                                   <g:hiddenField name="courseType" value="${assignInstance?.courseType}" />
                                   <g:hiddenField name="examType" value="${assignInstance?.examType}" />
                                  
                                   
                                 
                                </fieldset>
				<fieldset class="buttons">
					<g:actionSubmit class="gh_button save" action="saveassign" value="提交" />
                                        <g:link class="gh_button list" action="job">返回</g:link>
				</fieldset>
			</g:form>
		</div>
           <!-- end -->
          </div>
        </div>
      </div>
    </div>
  </div>
          
          
          
          
          
          
		
	
